package com.esun.payment_api.service;

import com.esun.common.api.CommonPage;
import com.esun.common.api.CommonResult;
import com.esun.common.bean.PageRequest;
import com.esun.payment_api.bean.UserBean;
import com.esun.payment_api.domain.SysLog;
import com.esun.payment_api.domain.User;
import org.springframework.stereotype.Service;

import javax.servlet.http.HttpServletRequest;

@Service
public interface LogService {
    //写访问日志。如果成功，日志类型为访问。
    CommonResult writeAccessLog(String moduleName, CommonResult commonResult);

    //写操作日志。如果成功，日志类型为操作。
    CommonResult writeOperationLog(String moduleName, CommonResult commonResult);

    //写自定义类型日志。
    CommonResult writeOtherLog(String moduleName, CommonResult commonResult, String logType);

    //写自定义内容日志。用于没有封装CommonResult或者CommonResult内容不足的情况。
    CommonResult writeCustomLog(String moduleName, String message, String logType);

    CommonResult getLogList(PageRequest pageRequest);

    CommonResult writeLoginLog(UserBean user, CommonResult commonResult);

    CommonResult writeErrorLog(String errorMessage, String moduleName);
}
